package com.stox.services.data.provider.manager.impl;

import java.util.List;

import com.stox.services.data.provider.manager.ScripManager;
import com.stox.services.data.provider.repository.ScripRepository;
import com.stox.shared.core.model.Scrip;
import com.stox.shared.core.model.filter.ScripCriteria;

public class ScripManagerImpl implements ScripManager {

	public static final ScripManagerImpl INSTANCE = new ScripManagerImpl();
	
	private ScripManagerImpl() {
		
	}
	
	public List<Scrip> findByScripCriteria(ScripCriteria scripFilter){
		return ScripRepository.INSTANCE.findByScripCriteria(scripFilter);
	}
	
	@Override
	public Scrip findOne(Long id) {
		return ScripRepository.INSTANCE.findOne(id);
	}

	@Override
	public List<Scrip> findByExchangeId(Long id) {
		return ScripRepository.INSTANCE.findAll();
	}
	
	@Override
	public void clearSaveAndFlush(List<Scrip> scrips) {
		ScripRepository.INSTANCE.clearSaveAndFlush(scrips);
	}

}
